<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>判断</title>
</head>
<body>
<div id="app">
    <div v-if="name==='张学友'">
        张天王
    </div>
    <div v-else-if="name==='刘德华'">
        刘天王
    </div>
    <div v-else>
        王
    </div>

    <hr/>
    <div v-if="age===18">
        if-18
    </div>

    <div v-show="age===18">
        show-18
    </div>

</div>
<script src="./node_modules/vue/dist/vue.js"></script>
<script>
    var app = new Vue({
        el: "#app",
        data: {
            name:"刘德华",
            age:18
        }

    });
</script>


</body>
</html>